<script setup lang="ts">
import { ref } from 'vue';
import { useNurseStore } from '@/store';
import { storeToRefs } from 'pinia';
import { useNurseHelp } from '@/service';
import { hideLoading, showLoading, usePullDownRefresh, stopPullDownRefresh } from '@tarojs/taro';
import { IconFont } from '@nutui/icons-vue-taro';
import Taro from '@tarojs/taro';
import { useAuthStore } from '@/store';
import wxImage from '@/assets/img/qy.png';
import allImage from '@/assets/img/all.png';
import { localStg } from '@/utils';

import kefu from '@/components/kefu.vue';


const { nurseUser } = storeToRefs(useAuthStore());

const { list } = useNurseHelp();

const { company, imageUrl } = storeToRefs(useNurseStore());
// company
const defaultHospital = JSON.parse(Taro.getStorageSync('defaultHospital') || '{}');

// defaultHospital


definePageConfig({
    navigationBarTitleText: '导诊台',
});
const data = ref([
    {
        name: '安安客服专线',
        phone: '13800138000',
        contacts: '安安客服专线',
        weixin: 'https://anfine.huasun-healthcare.com/kefu/anan.jpg'
    },
    {
        name: '安好客服专线',
        phone: '13800138001',
        contacts: '安好客服专线',
        weixin: 'https://anfine.huasun-healthcare.com/kefu/anhao.jpg'
    }
]);

function handleWeixin(weixin: string) {
    Taro.previewImage({
        urls: [weixin]
    })
}

function handlePhone(phone: string) {
    Taro.makePhoneCall({
        phoneNumber: phone
    })
}

</script>
<template>
    <kefu />
    <!-- <basic-layout>
        <view class="m_img1 w-full pos-fixed pos-left-0 pos-top-0"></view>
        <view class="w-375px text-primary flex-col-center justify-start m-t-60 m-b-2">
            <view v-for="item in data" class="w-360px">
                <view class="m_card1 b-rounded-3 shadow flex h-100px mt-2 flex-col justify-around items-start relative">
                    <view class="ml-6 text-20px">{{ item.name }}</view>
                    <view class="ml-6 flex justify-start items-center">
                        <view>{{ item.phone }}</view>
                        <view class="ml-2">
                            <nut-button type="primary" size="mini" @tap="handlePhone(item.phone)">拨打</nut-button>
                        </view>
                    </view>
                    <image :src="wxImage" @tap="handleWeixin(item.weixin)" class="!absolute right-[50rpx] top-[70rpx] w-[70rpx] h-[60rpx]" />
    
                </view>
            </view>
        </view>
    </basic-layout> -->
</template>

<style lang="scss">
.m_img1 {
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: 100% 100%;
    background-image: linear-gradient(to right, rgb(16, 185, 129), rgb(101, 163, 13));
}

.m_card1 {
    backdrop-filter: blur(10px) brightness(90%);
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}
</style>
